package com.yzy.fly.mapper;

import com.yzy.fly.entity.core.FlyClassAnnotation;
import com.yzy.fly.kernel.mapper.FlyBasicMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface FlyClassAnnotationMapper extends FlyBasicMapper<FlyClassAnnotation> {

    @Select("select * from fly_class_annotation a where 1=1")
    List<FlyClassAnnotation> selectAll();

    @Select("select * from fly_class_annotation a where 1=1 and a.classId = #{classId}")
    List<FlyClassAnnotation> selectAllByClassId(@Param("classId") int classId);

    @Select("select * from fly_class_annotation a where 1=1 and a.name = #{name}")
    FlyClassAnnotation selectOneByName(@Param("name") String name);

}